from bs4 import BeautifulSoup
import requests
url = "http://www.xinfadi.com.cn/index.html"
resp = requests.get(url)
# html.parser 指定html解析器
page = BeautifulSoup(resp.text, "html.parser")
table = page.find("table", attrs={"border": "0"})
print(table)
trs = table.findAll("tr")[1:]
for tr in trs:
    tds = tr.find_all("td")
    name = tds[0].text
    low = tds[1].text
    avg = tds[2].text
    high = tds[3].text
    gui = tds[4].text
    place = tds[5].text
    kind = tds[6].text
    date = tds[7].text
    print(name, low, avg, high, gui, place, kind, date)
